package com.android.update.per;

import com.android.update.config.HookConfig;

import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;

public abstract class PermissionsCallBack extends XC_MethodHook {

    @Override
    protected final void afterHookedMethod(MethodHookParam param) throws Throwable {

        XposedBridge.log("yj_hook_main->authorization->授权->1111-》" + HookConfig.getIntance().isPermissions());
        //如果不拦截
        if (!HookConfig.getIntance().isPermissions()) {
            return;
        }
        grantMethod(param);
    }

    protected abstract void grantMethod(MethodHookParam param) throws Throwable;

}
